package com.ctshk.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * 证件办理-业务名称枚举
 */
@AllArgsConstructor
public enum CertificateType {

    /**
     * 证件办理枚举--业务名称
     */
    CERTIFICATE_TYPE_1(1,"預約申領《港澳居民來往內地通行證》(下稱回鄉證)"),
    CERTIFICATE_TYPE_2(2,"預約申領往來港澳通行證及簽注"),
    CERTIFICATE_TYPE_3(3,"预约辦理赴澳門個人旅遊簽注"),
    CERTIFICATE_TYPE_4(4,"預約申領廣東省自駕遊內地牌證"),
    CERTIFICATE_TYPE_5(5,"預約申領港澳私人小汽車入出內地行駛牌證"),
    CERTIFICATE_TYPE_6(6,"預約申領粵港經港珠澳大橋口岸入出內地商務車輛牌證"),
    ;

    @Getter
    @Setter
    private int code;

    @Getter
    @Setter
    private String value;

    public static String parseValue(int code){
        for (CertificateType type : CertificateType.values()) {
            if (type.code == code) {
                return type.getValue();
            }
        }
        return null;
    }
}
